import {defineStore} from "pinia"

export const useLoginStore = defineStore("login", {
    // 组合式API
    state: () => {
        return {
            username: "",
            password: "",
            status: 0,
            role: "",
            token: "",
            permission: "",


        }
    },
    persist:{
        enabled:true,
        strategies:[
            {
                // 存储的key 登录状态
                key:"/login",
                storage:localStorage,
            }
        ]
    }
})